// 引入全局组件
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { createPinia } from 'pinia'
import { createApp } from 'vue'
import i18n from '@/i18n'
import router from '@/router'
import App from './App.vue'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'

import '@/permission'

import 'virtual:uno.css'

// 引入全局样式
import '@/assets/css/main.scss'

async function bootstrap() {
  const app = createApp(App)

  app.use(createPinia())
  app.use(router)
  app.use(i18n)

  // 全局组件
  app.use(ElementPlus, {
    locale: zhCn,
  })
  // https://next.router.vuejs.org/api/#isready
  // await router.isReady()

  app.mount('#app')
}

bootstrap()
